﻿package mortal.game.view.task.drama.operations
{
    import Message.DB.Tables.*;
    import mortal.game.mvc.*;

    public class TaskDramaBlowFly extends Object implements ITaskDramaStepCommand
    {
        private var _callback:Function;

        public function TaskDramaBlowFly()
        {
            return;
        }// end function

        public function call(param1:TTaskDrama, param2:Function = null) : void
        {
            this._callback = param2;
            var _loc_3:* = param1.route.split(";");
            var _loc_4:* = String(_loc_3[0]).split(",");
            _loc_3 = String(_loc_3[1]).split(",");
            GameController.scene.roleBeBlowFly(int(_loc_4[0]), int(_loc_4[1]), int(_loc_3[0]), int(_loc_3[1]), this.roleFlyCompl);
            return;
        }// end function

        private function roleFlyCompl() : void
        {
            if (this._callback != null)
            {
                this._callback.apply();
                this._callback = null;
            }
            return;
        }// end function

        public function cancel(param1:TTaskDrama, param2:Function = null) : void
        {
            this._callback = param2;
            return;
        }// end function

    }
}
